﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Library.StringExt.Randoms
{
    public class RandomTime
    {



        public static DateTime GetRandomTime()
        {
            DateTime time = DateTime.Now;
            var year = RandomExt.GetNumber(1, 20);
            var month = RandomExt.GetNumber(1, 12);
            var day = RandomExt.GetNumber(1, 31);
            var hour = RandomExt.GetNumber(1, 24);
            var minutes = RandomExt.GetNumber(1, 60);
            var seconds = RandomExt.GetNumber(1, 60);
            time = time.AddYears(-year).AddMonths(-month).AddDays(-day).AddHours(-hour).AddMinutes(-minutes).AddSeconds(-seconds);
            return time;
        }



    }
}
